package com.yao.amssm.system.control;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.yao.amssm.system.entiy.Employee;
import com.yao.amssm.system.service.IEmpService;

@Controller
@RequestMapping("/User")
public class UserControl {
	
	@Autowired
	IEmpService empService;
	
	@ResponseBody
	@RequestMapping("/getUser")
	public Object getUserList(){
		JSONObject obj = new JSONObject();
		List<Employee> list = empService.selectList(new EntityWrapper<Employee>());
		obj.put("data", list);
		return obj;
	}

}
